package com.dms.modules.product.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

@Data
@ApiModel(value = "ProductDTO", description = "商品信息DTO")
public class ProductDTO {
    
    @ApiModelProperty("商品ID")
    private Long id;
    
    @ApiModelProperty("店铺ID")
    private Long merchantId;
    
    @NotNull(message = "商品分类不能为空")
    @ApiModelProperty("商品分类ID")
    private Long categoryId;
    
    @NotBlank(message = "商品名称不能为空")
    @ApiModelProperty("商品名称")
    private String name;
    
    @ApiModelProperty("商品副标题")
    private String subtitle;
    
    @NotBlank(message = "商品主图不能为空")
    @ApiModelProperty("商品主图")
    private String mainImage;
    
    @ApiModelProperty("商品子图")
    private List<String> subImages;
    
    @ApiModelProperty("商品详情")
    private String detail;
    
    @NotNull(message = "商品价格不能为空")
    @ApiModelProperty("商品价格")
    private BigDecimal price;
    
    @ApiModelProperty("商品原价")
    private BigDecimal originalPrice;
    
    @NotNull(message = "商品库存不能为空")
    @ApiModelProperty("商品库存")
    private Integer stock;
    
    @ApiModelProperty("商品状态（0-下架，1-上架）")
    private Integer status;
    
    @ApiModelProperty("是否启用规格")
    private Boolean enableSpec;
    
    @ApiModelProperty("商品规格")
    private List<ProductSpecDTO> specs;
    
    @ApiModelProperty("SKU列表")
    private List<ProductSkuDTO> skuList;
    
    @ApiModelProperty("商品参数")
    private String params;
    
    @ApiModelProperty("是否推荐：0-否 1-是")
    private Integer isRecommend;
    
    @ApiModelProperty("是否新品：0-否 1-是")
    private Integer isNew;
    
    @ApiModelProperty("是否热销：0-否 1-是")
    private Integer isHot;
} 